package com.xxxx;

import com.xxxx.pojo.Person;
import org.apache.flink.api.java.ExecutionEnvironment;
import org.apache.flink.api.java.operators.DataSource;
import org.apache.flink.configuration.Configuration;

/**
 * 批量数据处理
 */
public class Hello11FlinkTypesPojo {
    public static void main(String[] args) throws Exception {
        //创建环境
        ExecutionEnvironment environment = ExecutionEnvironment.createLocalEnvironmentWithWebUI(new Configuration());
        //获取数据源
        DataSource<Person> source = environment.fromElements(new Person("zs", 16), new Person("ls", 17));
        source.filter(p -> p.age > 16).print();

    }
}
